package com.valveinspectionsys.order.activity;


import com.valveinspectionsys.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

/**
 * 2013-5-6
 * @author King
 * 工程单进入功能界面
 */
public class OrderMainActivity extends Activity implements OnClickListener{
     
    public Button button1;// RFID表报案

    public Button button3;// 其它报案
    public Button button4;// 一键上传
    public Button button5;// 报案查询
    public boolean isSafe = false;
    @Override
    protected void onCreate(Bundle savedInstanceState) {	
	super.onCreate(savedInstanceState);
	setContentView(R.layout.order_main);
	init();
	
    }

    /**
     * 初始化控件
     */
    public void init() {
	button1 = (Button) findViewById(R.id.order_main_rfid);

	button3 = (Button) findViewById(R.id.order_main_other);
	button4 = (Button) findViewById(R.id.order_main_upload);
	button5 = (Button) findViewById(R.id.order_main_query);
	button1.setOnClickListener(this);

	button3.setOnClickListener(this);
	button4.setOnClickListener(this);
	button5.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
	Intent intent=null;
	switch (v.getId()) {
	case R.id.order_main_other:
	    intent=new Intent(OrderMainActivity.this, OrderAddOtherActivity.class);
	    startActivity(intent);
	    break;
	case R.id.order_main_query:
	    intent=new Intent(OrderMainActivity.this, OrderQueryMainActivity.class);
	    startActivity(intent);
	    break;
	case R.id.order_main_upload:
	    intent=new Intent(OrderMainActivity.this, ReportUploadActivity.class);
	    startActivity(intent);
	    break;
	case R.id.order_main_rfid:
	    intent=new Intent(OrderMainActivity.this, OrderAddRfidActivity.class);
	    startActivity(intent);
	    break;
	default:
	    break;
	}
    }

    
}
